package dataMapper;

import java.io.BufferedReader;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import dataEntity.DefinedDataValue;

public class DefinedDataValueMapper {
	public static  Map<String,DefinedDataValue> process(BufferedReader br){
		Map<String,DefinedDataValue> map = new HashMap<String,DefinedDataValue>();
		try {
			br.readLine();
			while(br.ready()){
				DefinedDataValue object = buildObject(br.readLine());

//				map.put(object.getCHSI_State_Abbr() + "," + object.getCHSI_County_Name(), object);
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
		return map;
	}
	
	public static  DefinedDataValue buildObject(String inLine){
		String[] line = inLine.split(",");
		DefinedDataValue object = new DefinedDataValue();
		
		object.setData_Value(line[0]);
		object.setDescription(line[1]);

		return object;
	}
}
